﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using IceDog.Practice.Mvc.Code;

namespace IceDog.Practice.Mvc.Controllers
{
    public class TestController : Controller
    {
        // GET: Test
        public ActionResult Index()
        {
            var val = ConfigurationManager.AppSettings["siteName"];
            if (val != null)
                ViewBag.siteName = val;
            else
                ViewBag.siteName = "not found key";
            ViewBag.dreadonly = Check.IsWorkFlowMgtReadOnly();
            return View();
        }

        public ActionResult Test1()
        {
            var str = Request.RawUrl;
            return View();
        }

        public string Method1()
        {
            var str = HttpUtility.UrlDecode(Request.RawUrl);
            str += "&xx";
            str = HttpUtility.UrlEncode(str);
            return str;
        }
    }
}